﻿
﻿use master
go
create database Blogs
go
use Blogs
go
if exists(select * from sysobjects where name='Users')
drop table Users
create table Users
(id int primary key identity(1,1),
Username nvarchar(50) not null,
Passwords nvarchar(50) not null,
IsActived bit default 1,
IsDeleted bit default 0,
CreateTime datetime default getdate(),
UpdateTime datetime default getdate(),
Remarks nvarchar(max) 
)
if exists(select * from sysobjects where name='Articles')
drop table Articles
create table Articles
(
id int primary key identity(1,1),
Title nvarchar(50) not null,
Author nvarchar(50) not null,
Content nvarchar(max) not null,
IsActived bit default 1,
IsDeleted bit default 0,
CreateTime datetime default getdate(),
UpdateTime datetime default getdate(),
Remarks nvarchar(max) 

)
go
insert into Users(Username,Passwords) values('派大星','pdx123')

insert into Articles(Title,Author,Content) values('围城','钱锤书','asdfa'),
('四世同堂','老舍','asdfa'),
('家','巴金','qxw'),
('活着','余华','ddjej'),
('城南旧事','林海音','alle'),
('呐喊','鲁迅','阿斯顿大大当时的发'),
('边城','沈从文','的发生热点发生时'),
('白鹿原','陈忠实','搭理我ii叠加的色'),
('未央歌','鹿桥','阿斯蒂芬就爱上了对方就'),
('金华烟云','林语堂','奥斯卡大奖佛为三点'),
('aaa','是大法官','阿斯蒂芬'),
('sdf','市分公司地方高富帅','撒地方撒'),
('亲爱','张姑娘','为无所谓'),
('内容非常','歌诗达','阿魏酸'),
('参数','去fcv','区别'),
('烦恼','爱好发动机号','没工夫放牛班'),
('你发生过','芒果干','修改'),
('食发鬼','方式','你你你'),
('是飒飒','少时诵诗书所付过或','闪电发货国风大赏')

select * from Articles
select * from Users